package LiftData;

public class Weight {

	public static final double KG_TO_LBS = 2.20462262;
	public static final double LBS_TO_KG = 0.45359237;
	
	public enum WeightType {
		Pounds, Kilograms
	};

	private WeightType type;
	private double weight;

	public Weight(WeightType type, double weight) {
		this.type = type;
		this.weight = weight;
	}

	public void changeType(WeightType newType) {
		if (!(newType == this.type)) {
			if (newType == WeightType.Pounds) {
				weight *= KG_TO_LBS;
			} else {
				weight *= LBS_TO_KG;
			}
		}
		type = newType;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}

	public double getWeight() {
		return weight;
	}

}
